package com.hc.webapp.controller;

import java.util.HashMap;
import java.util.Map;

import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

/**
 * 
 * @author huchao
 *
 */
public class BaseController extends MultiActionController {

	/**
	 * 
	 * @return
	 */
	protected Map<String, String> returnSuccess() {
		return returnSuccess("success");
	}

	/**
	 * 
	 * @param type
	 * @param value
	 * @return
	 */
	protected Map<String, String> returnSuccess(String type, String value) {
		Map<String, String> result = new HashMap<String, String>();
		result.put(type, value);
		return result;
	}

	/**
	 * 
	 * @param str
	 * @return
	 */
	protected Map<String, String> returnCacl(String str) {
		Map<String, String> result = new HashMap<String, String>();
		result.put("success", str);
		return result;
	}

	/**
	 * 
	 * @param isSuccess
	 * @return
	 */
	protected Map<String, String> returnSuccess(String isSuccess) {
		Map<String, String> result = new HashMap<String, String>();
		result.put("success", isSuccess);
		return result;
	}

}